//    Copyright (C) Kherty.  All rights reserved.
using System.Collections.Generic;
using System.Text;

namespace OpenLS.Spreadsheet.Expressions
{
    class RowOrColumnAccessor
    {
        private readonly string _value;

        public RowOrColumnAccessor(string value)
        {
            _value = (value);
        }
        public override string ToString()
        {
            var sb = new StringBuilder();
            sb.Append('[');
            sb.Append(_value);
            sb.Append(']');
            return sb.ToString();
        }
    }
    class MultiRowOrColumnAccessor
    {
        private readonly List<RowOrColumnAccessor> _accessors;

        public MultiRowOrColumnAccessor(List<RowOrColumnAccessor> accessors)
        {
            _accessors = accessors;
        }
        public override string ToString()
        {
            var sb = new StringBuilder();
            for (int i = 0; i < _accessors.Count; i++)
            {
                sb.Append(_accessors[i]);
                if (i < _accessors.Count - 1)
                    sb.Append(":");
            }
            return sb.ToString();
        }
    }
}